import { createApp } from 'vue';
import { createPinia } from 'pinia';
import { Message } from '@arco-design/web-vue';
import ArcoVueIcon from '@arco-design/web-vue/es/icon';
import '@arco-design/web-vue/es/message/style/css.js';
import '@arco-design/web-vue/es/modal/style/css.js';
// 自定义组件（删除气泡，列表的操作项）
import customComponents from './components/custom/index';
import * as echarts from 'echarts';
import router from './router';
import './style.css';
import './assets/css/font.css';
import App from './App.vue';

import VMdEditor from '@kangc/v-md-editor';
import '@kangc/v-md-editor/lib/style/base-editor.css';
import githubTheme from '@kangc/v-md-editor/lib/theme/github.js';
import '@kangc/v-md-editor/lib/theme/style/github.css';

// highlightjs
import hljs from 'highlight.js';

VMdEditor.use(githubTheme, {
	Hljs: hljs,
});

// router.beforeEach((to,from,next)=>{
//     if(!to.meta.isHelpCenter){
//         next();
//     }
// })

const pinia = createPinia();

const app = createApp(App);
app.config.globalProperties.$message = Message;
app.config.globalProperties.$echarts = echarts;
app.use(pinia);
app.use(router);
app.use(ArcoVueIcon);
app.use(customComponents);

app.use(VMdEditor);

app.mount('#app');
